import Vue from 'vue'
import App from './App.vue'

// 导入实例&使用路由
import router from './router'
import store from './store'

Vue.config.productionTip = false

//引入重置样式
import './assets/css/index.scss'

//引入淘宝适配方案
import 'lib-flexible'

// 过滤器
import * as filters from '@/filters'
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

import {
  Button,
  Form,
  Field,
  Tab,
  Tabs,
  Icon,
  Rate,
  Divider,
  Skeleton,
  Image as VanImage,
  Sidebar,
  SidebarItem,
  Card,
  GoodsAction,
  GoodsActionIcon,
  GoodsActionButton,
  Stepper,
  Popup,
  Badge,
} from 'vant'

Vue.use(Button)
  .use(Form)
  .use(Field)
  .use(Tab)
  .use(Divider)
  .use(Tabs)
  .use(Rate)
  .use(Icon)
  .use(Skeleton)
  .use(VanImage)
  .use(Sidebar)
  .use(SidebarItem)
  .use(Card)
  .use(GoodsAction)
  .use(GoodsActionButton)
  .use(GoodsActionIcon)
  .use(Stepper)
  .use(Popup)
  .use(Badge)

new Vue({
  store,
  router,
  render: h => h(App),
}).$mount('#app')
